<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>相对定位</title>
</head>
<style>
    .main{
        background-color: yellow;
    }
    .main>div{
        width: 100px;
        height: 100px;
    }
    .z1{
        background-color: red;
    }
    .z2{
        background-color: orange;
        position: relative;
        left: 100px;
    }
    .z3{
        background-color: blue;
    }
</style>
<body>
    <div class="main">
        <div class="z1"></div>
        <div class="z2"></div>
        <div class="z3"></div>
    </div>
</body>
</html>